<template>
  <div>
    <TheHeader></TheHeader>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="tag" label="歌单"> </el-table-column>
      <el-table-column prop="user.username" label="所有者" > </el-table-column>
      <el-table-column prop="song.title" label="歌曲"> </el-table-column>
    </el-table>
    <PlayBar></PlayBar>
  </div>
</template>

<script>
import TheHeader from "../components/TheHeader.vue";
import PlayBar from "../components/PlayBar";
export default {
  data() {
    return {
      tableData: []
    };
  },
  created() {
    this.getCollect();
  },
  methods: {
    getCollect() {
      this.$http
        .get("collect/" + 11 + "/" + 1)
        .then(response => {
          console.log(response.data);
          this.tableData = response.data.data.items;
        })
        .catch(reason => {
          console.log(reason);
        });
    }
  },
  components: {
    PlayBar,
    TheHeader
  }
};
</script>

<style scoped></style>
